package com.chenfan.mcn.service;

import com.chenfan.mcn.dao.CommentLogMapper;
import com.chenfan.common.extension.mybatisplus.enhanced.EnhancedService;
import com.chenfan.mcn.model.CommentLog;
import com.chenfan.mcn.model.dto.CommentAddDTO;
import com.chenfan.mcn.model.dto.CommentUpdateDTO;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lizhejin
 * @since 2021-04-16
 */
public interface CommentLogService extends EnhancedService<CommentLogMapper, CommentLog> {

    /**
     * 新增评论
     *
     * @param commentAddDTO {@link CommentAddDTO}
     * @return Integer
     */
    boolean addComment(CommentAddDTO commentAddDTO);

    /**
     * 评论列表
     *
     * @param businessId
     * @param businessType
     * @return List<CommentLog> {@link CommentLog}
     */
    List<CommentLog> getCommentList(Long businessId, Integer businessType);

    /**
     * 编辑评论
     *
     * @param commentUpdateDTO {link CommentUpdateDTO}
     * @return Integer
     */
    boolean updateComment(CommentUpdateDTO commentUpdateDTO);

    /**
     * 评论详情
     *
     * @param id
     * @return CommentLog {link CommentLog}
     */
    CommentLog commentDetail(Long id);

    /**
     * 删除评论
     *
     * @param id
     * @return Integer
     */
    boolean deleteComment(@RequestParam Long id);

}
